from django.db import models


# 讲师模型
class Teacher(models.Model):
    name = models.CharField("名字", max_length=100, unique=True)
    desc = models.TextField("简介")
    pic = models.ImageField(upload_to='static/teacher_avatar/%Y%m%d/', blank=True, max_length=512)

    class Meta:
        db_table = 'syl_teacher'
        verbose_name = '讲师'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.name

# Create your models here.
